<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<script>
    function suffleArr(arr)
    {
        for(let i = 0;i<arr.length;i++)
        {
            let j = Math.floor(Math.random()*(i+1));
            [arr[i],arr[j]] = [arr[j],arr[i]];
        }

        return arr;
    }
    let arr = [1,2,3,4,5];
    arr = suffleArr(arr);
    console.log(arr);
</script>
<body>
    
</body>
</html>